package com.nuc.impl2;

/**
 * Time    : 2023/3/28 21:35
 * Author  : 王摇摆
 * FileName: Role.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Role {
    private IWeapon weapon;

    public Role() {
    }

    public Role(IWeapon weapon) {
        this.weapon = weapon;
    }

    public void attack(Monster monster) {
        weapon.attackMonster(monster);
    }
}
